×
☰ See All Chapters

How to allocate fixed public IP address to AWS EC2 virtual machine

Each VM is allocated with a public IP address automatically. But when you reboot your virtual machine, the public IP address changes. If you have to configure a static IP to virtual machine you should use a service called Elastic IPs for allocating fixed public IP addresses. You can allocate a public IP address and associate it with an EC2 instance by following these steps.

Step 1: Open the Management Console, and go to the EC2 service.

fixed-public-ip-address-to-ec2-virtual-machine-0
 

Step 2: Choose Elastic IPs from the submenu. You’ll see an overview of public IP addresses.

fixed-public-ip-address-to-ec2-virtual-machine-1
 

Step 3:  Allocate a public IP address by clicking Allocate Elastic IP Address.

fixed-public-ip-address-to-ec2-virtual-machine-2
 

Step 4: Confirm by clicking on Allocate.

fixed-public-ip-address-to-ec2-virtual-machine-3
 

Step 5:  Your fixed public IP address is shown. Click Close to go back to the overview.

fixed-public-ip-address-to-ec2-virtual-machine-4
 

Step 6: Associate the IP to Instance. Select the IP and click on Actions, select Associate Elastic IP address

fixed-public-ip-address-to-ec2-virtual-machine-5
 

Step 7: Associate the Instance. Enter your EC2 instance’s ID in the Instance field. There is only a single virtual machine running at the moment, so only one option is available. Only one Private IP is available for your virtual machine. Select it. Click Associate to finish the process.

fixed-public-ip-address-to-ec2-virtual-machine-6
 

Now you can see the success message.

fixed-public-ip-address-to-ec2-virtual-machine-7
 

You can also verify at instance list page.

fixed-public-ip-address-to-ec2-virtual-machine-8
 

All Chapters
Author